package cn.ulc.store.dao.user;

import cn.ulc.common.constant.enums.AvailableStatus;
import cn.ulc.store.dao.BaseDao;
import cn.ulc.store.entity.Coupon;
import cn.ulc.store.entity.user.UserCoupon;
import org.beetl.sql.core.annotatoin.SqlResource;

import java.math.BigDecimal;
import java.util.List;


/*
* UserCoupon
* gen by Jin mapper 2019-06-15
*/
@SqlResource("user.userCoupon")
public interface UserCouponDao extends BaseDao<UserCoupon> {

    List<UserCoupon> findListByUserId(Long wxUserId,String status,Boolean isUsed);

    String findMaxCode(Long wxUserId,String code);

    List<UserCoupon> findAvailableListByUserId(Long wxUserId, String status, Boolean isUsed, BigDecimal goodsAmount);

    List<UserCoupon> findListByUsed(Boolean isUsed,Boolean isForever);

    UserCoupon findByCode(String code);

}
